package com.jqr.activity.jumpactivity01;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;

public class OtherActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_other);
        //A-B 传参
//        Intent intent=new Intent();
//
//        String other= intent.getStringExtra("other");
//
//        System.out.println(other);

        // A-B-A 传参
        Intent intent=new Intent();
        String resultData="这是返回的数据";
        intent.putExtra("other",resultData);
        setResult(RESULT_OK,intent);
        finish();
    }
}